package net.qiqbframework.persisthanding;


import net.qiqbframework.messaging.annotation.MessageHandler;

import java.lang.annotation.*;

/**
 * 持久化聚合对象
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@MessageHandler(messageType = PersistMessage.class)
public @interface PersistHandler {

    String routingAggregateName() default "";

    /**
     * 默认是所有的
     *
     * @return
     */
    PersistType type() default PersistType.ALL;

    /**
     * 是否支持批量
     *
     * @return
     */
    boolean supportBatch() default false;
}
